<template>
	<div class="right-cps-view">
		<div class="tbs-view">
			<!-- <button>検査計画</button>
			<button>検査計画2</button> -->
			<el-button v-for="(item, index) in tabs" :key="index" @click="activeBtn = index"
				:type="activeBtn == index ? 'primary' : ''">
				{{ item.title }}
			</el-button>
		</div>


		<!-- content -->
		<div class="container">
			<div class="add-view" v-show="$hasEditPermission('/BHView')">
				<el-button size="small" @click="changeTypeFn" :disabled="delFlg"
					:style="{ background: Type == 1 ? '#bc000f' : '', color: Type == 1 ? 'white' : '', borderColor: Type == 1 ? '#bc000f' : '' }">
					{{ $t("message.bhView.topBtnDownList.addition") }}
				</el-button>
				<el-button size="small" @click="delFn" :disabled="Type == 1 || noDataFlg"
					:style="{ background: delFlg ? '#bc000f' : '', color: delFlg ? 'white' : '', borderColor: delFlg ? '#bc000f' : '' }">
					{{ $t("message.bhView.topBtnDownList.delete") }}
				</el-button>
				<!-- -弹框是否出现-{{ rightViewFlag1 }}-
				-是否修改-{{ DataChange }}- -->
			</div>

			<div class="list">
				<ux-grid ref="multipleTable" :data="GSData" style="width: 100%" :header-cell-style="{
					color: 'rgba(0, 0, 0)',
					fontSize: '14px',
					textAlign: 'center',
					fontWeight: '700',
					padding: 0,
					height: '32px',
				}" :cell-style="{
					color: 'rgba(96,98,102,1)',
					fontSize: '14px',
					textAlign: 'center',
					padding: 0,
					height: '32px',
				}" :row-style="{
					color: 'rgba(96,98,102,1)',
					fontSize: '13px',
					textAlign: 'left',
					padding: 0,
					height: '32px',
				}" @current-change="handleSelectionChange" height="160" :element-loading-text="$t('message.bhView.loading')"
					v-loading="loadingFlg">
					<template slot="empty"> No data </template>
					<ux-table-column width="40">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.id
							}}</p>
						</template>
						<!-- <template slot-scope="scope">
							<p style="text-align:center;">{{ scope.$rowIndex + 1 }}</p>
						</template> -->
					</ux-table-column>

					<ux-table-column property="bPosName" title="検査位置" width="116">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.bPosName }}</p>
						</template>
					</ux-table-column>

					<ux-table-column property="no" title="NO." width="50">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.no }}</p>
						</template>
					</ux-table-column>

					<ux-table-column property="iCodName" title="検査目的" width="90">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.iCodName }}</p>
						</template>
					</ux-table-column>

					<ux-table-column property="stdDate" title="基準年月" width="90">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.stdDate }}</p>
						</template>
					</ux-table-column>

					<ux-table-column property="cyc" title="周期" width="50">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.cyc }}</p>
						</template>
					</ux-table-column>

					<!-- <ux-table-column property="ispWayName" title="検査法案" width="116">
						<template slot-scope="scope">
							<p>{{ scope.row.ispWayName }}</p>
						</template>
					</ux-table-column> -->

					<!-- <ux-table-column property="status" title="状態" width="102">
						<template slot-scope="scope">
							<p>{{ scope.row.status }}</p>
						</template>
					</ux-table-column> -->

					<ux-table-column property="lstOpeDate" title="最終検査年月" width="110">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.lstOpeDate }}</p>
						</template>
					</ux-table-column>
					<ux-table-column property="plnLstSSnDate" title="次回検査年月" width="110">
						<template slot-scope="scope">
							<p :style="{ textAlign: center, color: scope.row.useCase == 2 ? 'red' : '' }">{{
								scope.row.plnLstSSnDate }}</p>
						</template>
					</ux-table-column>
				</ux-grid>
				<span style="color:red ;display: inline-block; margin-top: 8px;">赤字：休止中</span>
			</div>

			<div :class="[Type != 1 && noDataFlg ? 'maskDisabled1' : '', $hasEditPermission('/BHView') ? '' : 'maskDisabled1']"
				class="container">
				<div
					:class="[Type != 1 && noDataFlg ? 'maskDisabled2' : '', $hasEditPermission('/BHView') ? '' : 'maskDisabled2']">

					<div v-show="activeBtn == 0">
						<div class="row spb">
							<div class="item">
								<div class="label">
									検査位置
								</div>
								<div class="fb">
									<el-input type="text" placeholder=" " v-model="handList.no"
										class="orange center ipt w48"
										@input="handList.no = $setMyNum(handList.no, '3 - 0')"></el-input>
									<el-select v-model="handList.bPosName" class="ipt orange" placeholder=" "
										style="width:66%;"
										@input="handList.bPosName = $setMaxLength(handList.bPosName, 60)" filterable
										allow-create>
										<el-option v-for="item in selectDataList.ispPosList" :key="item.key"
											:label="item.label" :value="item.label">
										</el-option>
									</el-select>
								</div>
							</div>
							<div class="item">
								<div class="label">
									利用状況
								</div>
								<div class="radio-view">
									<el-radio v-model="handList.useCase" label="1">運用</el-radio>
									<el-radio v-model="handList.useCase" label="2">休止</el-radio>
								</div>
							</div>
						</div>

						<div class="row spb">
							<div class="item">
								<div class="label">
									検査目的
								</div>
								<el-select v-model="handList.iCodName" class="ipt orange" placeholder=" ">
									<el-option v-for="item in selectDataList.insPurposeList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
							<div class="item">
								<div class="label">
									検査面
								</div>
								<el-select v-model="handList.ispSpcCode" class="ipt orange" placeholder=" " filterable
									@input="handList.ispSpcCode = $setMaxLength(handList.ispSpcCode, 12)" allow-create>
									<el-option v-for="item in selectDataList.ispSurFacList" :key="item" :label="item"
										:value="item">
									</el-option>
								</el-select>
							</div>
						</div>

						<div class="row spb">
							<div class="item">
								<div class="label">
									検査方案
								</div>
								<el-select v-model="handList.ispWayName" class="ipt orange" placeholder=" " filterable
									@input="handList.ispWayName = $setMaxLength(handList.ispWayName, 20)" allow-create>
									<el-option v-for="item in selectDataList.ispWayList" :key="item.key" :label="item"
										:value="item">
									</el-option>
								</el-select>
							</div>
							<div class="item">
								<div class="label">
									実施時期
								</div>
								<el-select v-model="handList.tCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.exeTimList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
						</div>

						<!-- <div class="row b700" style="border-top:1px solid #D9D9D9">
							周期設定基準
						</div>
						<div class="row">
							<div class="item w150">
								<div class="label">
									点検周期
								</div>
							</div>
							<div class="item ii">
								<div class="label">
									<el-radio label="0" v-model="handList.stdMode">基準年月</el-radio>
								</div>
								<el-date-picker v-model="handList.stdDate" type="month" class="ipt" placeholder=" "
									:class="handList.stdMode == 0 ? 'orange' : ''" :clearable="false"
									:format="timeFormat" :value-format="timeFormat" @change="dateChange"
									style="width:150px;" v-if="handList.stdMode == 0">
								</el-date-picker>
							</div>
							<div class="item" v-if="handList.stdMode == 0">
								<div class="label" style="padding-left: 15px;">
									<el-checkbox v-model="handList.stdJudge">基準年月も計画年月に含める</el-checkbox>
								</div>
							</div>
						</div>

						<div class="row">
							<div class="item w150">
								<el-input type="text" placeholder=" " v-model.number="handList.cyc" class="orange w48"
									@input="handList.cyc = $setMyNum(handList.cyc, '3 - 0')"></el-input>
								<div class="label" style="margin-left:10px;">
									ヶ月
								</div>
							</div>
							<div class="item">
								<div class="label">
									<el-radio label="1" v-model="handList.stdMode">最終検査基準</el-radio>
								</div>
							</div>
						</div> -->


						<div class="row b700" style="border-top:1px solid #D9D9D9">
							<div class="item item long-item">
								<div class="label" style="min-width: 160px;">
									周期設定基準
								</div>
								<div class="radio-view"
									style="width: 490px;justify-content: flex-start;padding-left: 24px;">
									<el-radio v-model="handList.stdMode" label="0">設定値</el-radio>
									<el-radio v-model="handList.stdMode" label="1">最終検査</el-radio>
								</div>
							</div>
						</div>
						<div class="row" style="min-height: 44px;padding-top: 0;">
							<div class=" item item long-item">
								<div class="label" style="min-width: 160px;"></div>
								<div class=""
									style="width: 490px;display: flex;align-items: center; justify-content: flex-start;">
									<span>点検周期</span>
									<el-input v-model="handList.cyc" class="small-ipt center  mini-ipt74 orange"
										style="margin: 0 8px;"
										@input="handList.cyc = $setMyNum(handList.cyc, '3 - 0')"></el-input>
									<span>ヶ月</span>
								</div>
							</div>
						</div>
						<div class="row" style="min-height: 44px;padding-top: 0;">
							<div class="item item long-item" v-show="handList.stdMode == 0">
								<div class="label" style="min-width: 160px;"></div>
								<div class=""
									style="width: 490px;display: flex;align-items: center; justify-content: flex-start;">
									<span>基準年月</span>
									<el-date-picker v-model="handList.stdDate" class="ipt1 orange" placeholder=" "
										type="month" :clearable="false" :format="timeFormat" :value-format="timeFormat">
									</el-date-picker>
									<el-checkbox v-model="handList.stdJudge">基準年月も計画年月に含める</el-checkbox>
								</div>
							</div>
						</div>

						<div class="row spb" style="border-top:1px solid #D9D9D9">
							<div class="label">
								実施理由
							</div>
							<el-input v-model="handList.opeReas" class="ipt long-ipt"
								@input="handList.opeReas = $setMaxLength(handList.opeReas, 60)"
								style="width:calc(100% - 89px)"></el-input>
						</div>

						<div class="row spb">
							<div class="item">
								<div class="label">
									開放要否
								</div>
								<el-select v-model="handList.oCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.exiOpnList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
							<div class="item">
								<div class="label">
									保温保冷
								</div>
								<el-select v-model="handList.yCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.thkTypList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
						</div>

						<div class="row spb">
							<div class="item">
								<div class="label">
									足場工事
								</div>
								<el-select v-model="handList.sCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.icdCstList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
							<div class="item">
								<div class="label">
									高さ
								</div>
								<el-input v-model="handList.height" class="ipt long-ipt mar10"
									@input="handList.height = $setMyNum(handList.height, '5 - 0')"></el-input>
								<span>[mm]</span>
							</div>
						</div>

						<div class="row spb">
							<div class="item">
								<div class="label">
									作業区分
								</div>
								<el-select v-model="handList.wCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.opeWrkList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
							<div class="item">
								<div class="label">
									腐食系統
								</div>
								<el-select v-model="handList.clCodName" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.corrSysList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
						</div>

						<div class="row spb">
							<div class="item" v-if="$store.state.macType == 2">
								<div class="label">
									ラインNo.
								</div>
								<el-select v-model="handList.macName" class="ipt orange" placeholder=" ">
									<el-option v-for="item in selectDataList.macNumbList" :key="item.key"
										:label="item.label" :value="item.label">
									</el-option>
								</el-select>
							</div>
							<div class="item">

							</div>
						</div>
						<div class="row spb"
							style="justify-content: space-between;border-top:1px solid #D9D9D9;transform: translateY(12px);">
							<div class="item">

							</div>
							<el-button type="primary" size="small" @click="getRHDataFn">肉厚仕様参照</el-button>
						</div>
						<div class="row spb">
							<div class="item ">
								<div class="label">
									建設年月
								</div>
								<el-date-picker v-model="handList.chgDate" class="picker" placeholder=" "
									:clearable="false" :format="timeFormat1" :value-format="timeFormat1">
								</el-date-picker>
							</div>
							<div class="item">
								<div class="label">
									材質分類
								</div>
								<el-select v-model="handList.mtrClsCode" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.mtrList" :key="item.key"
										:label="item.label" :value="item.key">
									</el-option>
								</el-select>
							</div>
						</div>
						<div class="row spb">
							<div class="item">
								<div class="label">
									元肉厚
								</div>
								<el-input v-model="handList.orgThck" class="ipt tip-ipt mar10"
									@input="handList.orgThck = $setMyNum(handList.orgThck, '4 - 2')"></el-input>
								<span>[mm]</span>
							</div>
							<div class="item">
								<div class="label">
									材質名称
								</div>
								<el-input v-model="handList.mtrName" class="ipt long-ipt"
									@input="handList.mtrName = $setMaxLength(handList.mtrName, 40)"></el-input>
							</div>
						</div>
						<div class="row spb">
							<div class="item">
								<div class="label">
									管理値
								</div>
								<el-input v-model="handList.mgtThck" class="ipt tip-ipt mar10"
									@input="handList.mgtThck = $setMyNum(handList.mgtThck, '4 - 2')"></el-input>
								<span>[mm]</span>
							</div>
							<div class="item">
								<div class="label">
									サイズ
								</div>
								<el-select v-model="handList.sizCode" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.sizList" :key="item.key"
										:label="item.label" :value="item.key">
									</el-option>
								</el-select>
							</div>
						</div>
						<div class="row spb">
							<div class="item">
								<div class="label">
									限界値
								</div>
								<el-input v-model="handList.lmtThck" class="ipt tip-ipt mar10"
									@input="handList.lmtThck = $setMyNum(handList.lmtThck, '4 - 2')"></el-input>
								<span>[mm]</span>
							</div>
							<div class="item">
								<div class="label">
									Sch
								</div>
								<el-select v-model="handList.schCode" class="ipt" placeholder=" ">
									<el-option v-for="item in selectDataList.schList" :key="item.key"
										:label="item.label" :value="item.key">
									</el-option>
								</el-select>
							</div>
						</div>
					</div>


					<div v-show="activeBtn == 1">
						<div class="row spb" v-for="(item, index) in selectDataList.factorTitleList" :key="index">
							<div class="label">
								{{ item.label }}
							</div>
							<el-select v-model="handList[`f${index + 1}CodName`]" class="ipt long-ipt" placeholder=" ">
								<el-option v-for="item in selectDataList[`factorName0${index + 1}`].dataList"
									:key="item.key" :label="item.label" :value="item.label">
								</el-option>
							</el-select>
						</div>

						<div class="row spb alits">
							<div class="label">
								特記事項
							</div>
							<el-input type="textarea" :rows="4" placeholder=" " v-model="handList.specialNote"
								@input="handList.specialNote = $setMaxLength(handList.specialNote, 200)"
								class="textarea long-ipt" style="width:calc(100% - 89px)"></el-input>
						</div>
					</div>

				</div>
			</div>
		</div>

		<!-- footer -->
		<footer class="footer-view">
			<el-button type="primary" v-show="$hasEditPermission('/BHView')" :disabled="!handList.no" @click="saveFn(true)">{{
				$t("message.bgDataStyle.btn_save")
			}}</el-button>
			<el-button type="warning" @click="onCloseClick">
				{{ $t("message.public.close") }}
			</el-button>
		</footer>

		<RTable v-if="LIEF2" @hidden="hidden" @getRTableDataFn="getRTableDataFn">
		</RTable>
	</div>
</template>

<script>
import { GetOperationDetialsCombox, GetRequiredMsgByLabel, GetOperationDetialsList, getDetailPlanSaveMsg, updOperationDetialsVerifyO, updOperationDetialsVerifyT, updOperationDetials, delOperationDetials } from "@/api/api";
import { getLocalStorage, getLang } from "@/utils/storage";
import eventBus from "@/eventBus/bus";
import { getCookie } from "@/utils/cookie";
import BASE from '@/utils/base'
import _ from 'lodash-es';
import { showLoading, hideLoading } from "@/utils/loading";
import RTable from "./RTable.vue";
export default {
	name: "TabsCompontens1",
	props: ["tableSelectRow", "rightViewFlag1"],
	data() {
		return {
			LIEF2: false,
			//  数据是否修改过
			DataChange: false,
			isConfirming: false,


			currentRow: null,

			center: null,

			tabs: [{ title: "検査計画" }, { title: "検査計画2" }],
			activeBtn: 0,
			userData: getLocalStorage("userData"),
			delFlg: false,
			noDataFlg: false,
			timeFormat: "yyyy-MM",
			timeFormat1: "yyyy-MM-dd",

			time: "2022-2",
			loadingFlg: false,
			checked: false,
			GSData: [
				{
					actuKbn: 0,
					actuNo: "",
					approval: "",
					bookCheck: '',
					chgDate: "",
					cntPln: "",
					crrDept: "",
					heaThck: "",
					icdCstCodName: '',
					impReason: "",
					inspectCode: "",
					inspectName: "",
					ispRstAbrv: "0x80FF80",
					ispRstCodName: "",
					ispSpcCode: "",
					ispWayName: "",
					lmtThck: '',
					lstLif2: "",
					lstThk: "",
					mgtThck: "",
					oddLif: "",
					opeDate: "",
					opnCodName: "",
					orgThck: "",
					posName: "",
					posNo: "",
					remThck: "",
					ssnDate: "",
					summary: "",
					thckRlType: "",
					thkCodName: '',
					timCodName: "",
				}
			],
			selectDataList: [],

			wrkClsListData: [
				{
					key: 9,
					label: "Ｍ／Ｈ開放"
				}, {
					key: 10,
					label: "開放"
				}, {
					key: 11,
					label: "359"
				},
			],
			handList: {},
			handListOldData: {},
			MacNumb: '',
			Type: 2,
			startData: {},
		};
	},
	components: {
		RTable
	},
	computed: {
	},
	watch: {
		handList: {
			deep: true,
			immediate: true,
			handler: function (newV, oldV) {
				// setTimeout(() => {
				// 	if (_.isEqual(newV, this.startData)) {
				// 		this.$store.state.isStop.flg = false;
				// 		this.$store.state.isStop.next = 'default';
				// 	} else {
				// 		this.$store.state.isStop.flg = true;
				// 		this.$store.state.isStop.next = 'no';
				// 	}
				// }, 300);
				console.log('目视详细数据对比', newV, this.startData, !_.isEqual(newV, this.startData));

				this.DataChange = !_.isEqual(newV, this.startData);
			},
		},
		rightViewFlag1: {
			deep: true,
			immediate: true,
			handler: function (newV, oldV) {
				this.$refs.multipleTable.refreshColumn();
			},
		},
		// '$store.state.isStop.name': function (nVal, oVal) {
		// 	//你需要执行的代码
		// 	if (nVal == 'active') {
		// 		this.saveFn();
		// 	}
		// },
	},
	methods: {
		//	获取 肉厚仕样参照  数据
		updateProperties(target, source) {
			for (let key in source) {
				if (source.hasOwnProperty(key)) {
					target[key] = source[key];
				}
			}
		},
		async getRHDataFn() {
			this.LIEF2 = true;
		},
		getRTableDataFn(e) {
			this.updateProperties(this.handList, e);
		},
		async hidden() {
			this.LIEF2 = false;
		},

		// reSetTableFn1() {
		// 	this.$refs.multipleTable.refreshColumn();
		// },

		changeTypeFn() {

			//初始监听状态

			eventBus.$emit('getBasicStyleCompontensCurrent_EventBus');	//	基本仕样


			let Fn = () => {
				let qq = "ssqcop";
				this.Type = 1;
				this.handList = {
					bPosName: "ﾎﾞﾄﾑﾌﾟﾚｰﾄ",
					clCodName: " ",
					cyc: "1",
					dmgCode: 36848,
					f1CodName: " ",
					f2CodName: " ",
					f3CodName: " ",
					f4CodName: " ",
					f5CodName: " ",
					height: "11",
					iCodName: "475℃脆化",
					id: 2,
					ispSpcCode: "475℃脆化",
					ispWayName: "1212",
					lstOpeDate: "",
					macName: "zjq327配管555",
					no: "2",
					oCodName: "要",
					opeReas: "1111111111111111111111111111",
					planNo: 2,
					sCodName: "足場不要",
					specialNote: "11111111",
					status: "運用",
					stdDate: "2023-04",
					stdJudge: true,
					stdJudgeStr: "Checked",
					stdMode: "0",
					tCodName: "定期",
					useCase: "1",
					wCodName: "補修",
					yCodName: "B",
					sizCode: this.selectDataList.sizList[0].key,
					schCode: this.selectDataList.schList[0].key,
				}
				Object.keys(this.handList).forEach(key => {
					if (key != 'dmgCode' || key != 'planNo' || key != 'stdMode' || key != 'stdJudge' || key != 'useCase' || key != 'macName') {
						if (typeof (this.handList[key]) == 'number') {
							this.handList[key] = 0;
						} else if (typeof (this.handList[key]) == 'string') {
							this.handList[key] = '';
						} else {
							this.handList[key] = false;
						}
					}
				})

				this.handList.dmgCode = this.$store.state.macCode;
				this.handList.planNo = this.handList.no;
				this.handList.stdMode = '0';
				this.handList.stdJudge = true;
				this.handList.useCase = '1';
				this.handList.macName = this.selectDataList.macNumbList[0].label;
				this.handList.stdDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}`;

				// this.startData = _.cloneDeep(this.handList);
				this.handListOldData = _.cloneDeep(this.handList);
			}
			/**
			 * 2。  记录当前函数。
			 */
			if (this.$store.state.isCurrentNext) {
				Fn();
			} else {
				/**
				  * 4-1。   记录原来该运行的函数。
				  * 4-2。   执行保存弹出框操作。   
				  */
				this.$store.commit("changeIsCurrentFn", Fn);

				eventBus.$emit('EventBusBasicStyleCompontensSaveFn');	//	基本仕样
			}


		},
		async delFn() {
			this.delFlg = true;
			let msg = await this.getDetailPlanSaveMsgApi(2);
			this.$confirm(msg.data.data, '', {
				confirmButtonText: 'OK',
				cancelButtonText: 'Cancel',
				type: 'warning'
			}).then(async () => {
				let dataJson = {
					dmgCode: this.handList.dmgCode,
					planNo: this.handList.planNo,
				};
				let res = await delOperationDetials(dataJson);
				if (res.data.code != 0) {
					this.$message({
						type: 'error',
						message: res.data.msg
					});
					return
				}
				this.$message({
					type: 'success',
					message: res.data.msg
				});
				eventBus.$emit("LoadMSDetailTabelData")
				this.GetOperationDetialsListApi();
				this.delFlg = false;

				//	重新加载svg
				this.$emit('updateSvgAndMarkups');
			}).catch(() => {
				this.delFlg = false;
			});
		},
		async saveFn(isSaveBtn) {

			// if (this.isConfirming) {
			// 	return
			// }
			this.isConfirming = true;

			// if (this.handList.stdMode == 0 && !this.handList.stdDate) {
			// 	let r1 = await GetRequiredMsgByLabel({ label: '基準年月' });

			// 	console.log(r1);
			// 	this.$alert(r1.data.data, {
			// 		confirmButtonText: 'OK',
			// 	});
			// 	return
			// }

			let msg = await this.getDetailPlanSaveMsgApi(1);
			if (msg.data.code == 451) {
				this.$confirm(msg.data.data, '', {
					confirmButtonText: 'OK',
					cancelButtonText: 'Cancel',
					type: 'warning'
				}).then(async () => {


					let getMSG = '';

					if (this.handList.cyc.toString().trim() == '') {
						getMSG = '点検周期'
					}

					if (this.handList.stdMode == 0 && !this.handList.stdDate) {
						getMSG = '基準年月'
					}

					if (this.handList.ispSpcCode.trim() == '' || !this.handList.ispSpcCode) {
						getMSG = '検査面'
					}

					if (this.handList.ispWayName.trim() == '' || !this.handList.ispWayName) {
						getMSG = '検査方案'
					}

					if (this.handList.iCodName.trim() == '' || !this.handList.iCodName) {
						getMSG = '検査目的'
					}

					if (this.handList.bPosName.trim() == '' || !this.handList.bPosName || this.handList.no == '' || !this.handList.no) {
						getMSG = '検査位置'
					}


					let getMsgJson = { label: getMSG }
					if (getMSG != '') {
						let reqMSG = await GetRequiredMsgByLabel(getMsgJson);
						this.$alert(reqMSG.data.data, {
							confirmButtonText: 'OK',
							type: 'warning',
						});
						// this.$store.commit('reSetIsStop');
						//  导航条误
						eventBus.$emit('isNavChangeErrorFn');
						//  搜索框索引误
						eventBus.$emit('backParamsForLeftView');
						return
					}

					let res1 = await this.updOperationDetialsVerifyOApi();
					if (res1.data.code == 451) {
						this.$confirm(res1.data.msg, '', {
							confirmButtonText: 'OK',
							cancelButtonText: 'Cancel',
							type: 'warning'
						}).then(async () => {
							let res2 = await this.updOperationDetialsVerifyTApi();
							if (!res2) {
								//  导航条误
								eventBus.$emit('isNavChangeErrorFn');
								//  搜索框索引误
								eventBus.$emit('backParamsForLeftView');
								return
							}
							if (res2.data.code == 452) {
								this.$confirm(res2.data.msg, '', {
									confirmButtonText: 'OK',
									cancelButtonText: 'Cancel',
									type: 'warning'
								}).then(async () => {
									let res3 = await this.updOperationDetialsApi(isSaveBtn);
									if (res3.data.code != 0) {
										this.$message({
											type: 'error',
											message: res3.data.msg
										});
										return
									}
									this.$message({
										type: 'success',
										message: res3.data.msg
									});
								}).catch(() => {
								});
								return
							}
							let res3 = await this.updOperationDetialsApi(isSaveBtn);
							if (res3.data.code != 0) {
								this.$message({
									type: 'error',
									message: res3.data.msg
								});
								//  导航条误
								eventBus.$emit('isNavChangeErrorFn');
								//  搜索框索引误
								eventBus.$emit('backParamsForLeftView');
								return
							}
							this.$message({
								type: 'success',
								message: res3.data.msg
							});
						}).catch(() => {
						});
						return
					}
					let res2 = await this.updOperationDetialsVerifyTApi();
					if (!res2) {
						//  导航条误
						eventBus.$emit('isNavChangeErrorFn');
						//  搜索框索引误
						eventBus.$emit('backParamsForLeftView');
						return
					}
					if (res2.data.code == 452) {
						this.$confirm(res2.data.msg, '', {
							confirmButtonText: 'OK',
							cancelButtonText: 'Cancel',
							type: 'warning'
						}).then(async () => {
							let res3 = await this.updOperationDetialsApi(isSaveBtn);
							if (res3.data.code != 0) {
								this.$message({
									type: 'error',
									message: res3.data.msg
								});
								return
							}
							this.$message({
								type: 'success',
								message: res3.data.msg
							});
						}).catch(() => {
						});
						return
					}
					let res3 = await this.updOperationDetialsApi(isSaveBtn);
					if (res3.data.code != 0) {
						this.$message({
							type: 'error',
							message: res3.data.msg
						});
						//  导航条误
						eventBus.$emit('isNavChangeErrorFn');
						//  搜索框索引误
						eventBus.$emit('backParamsForLeftView');
						return
					}
					this.$message({
						type: 'success',
						message: res3.data.msg
					});
				}).catch(() => {
					// this.$store.commit('reSetIsStop');
					// eventBus.$emit('goNextOfLeftTable');
					// this.handleSelectionChange(this.startData)
					try {
						var tempFn = null;
						tempFn = this.$store.state.isCurrentFn.toString();
					} catch (error) {
						//
					}

					if (isSaveBtn) {
						return
					}
					this.$store.state.isCurrentNext = true;
					if (this.Type == 1) this.Type = 2;
					eventBus.$emit('LoadDetailTabelData');
					eventBus.$emit("LoadMSDetailTabelData")
					this.GetOperationDetialsListApi();

					if (tempFn.indexOf('ssqcop') != -1) {
						setTimeout(() => {
							this.$store.state.isCurrentFn();
							this.$store.commit("reSetIsCurrent");
						}, 2000);
					} else {
						this.$store.state.isCurrentFn();
						this.$store.commit("reSetIsCurrent");
					}
				});
			}
			console.log(msg);
			// return
			//修改前验证1

			//修改前验证1
			// this.updOperationDetialsVerifyOApi();
			//修改前验证2
			// this.updOperationDetialsVerifyTApi();
			//修改
			// this.updOperationDetialsApi(isSaveBtn);

			//获取总数居
			// this.GetOperationDetialsListApi();
			//获取下拉框
			// this.GetOperationDetialsComboxApi();
			//获取dataJson
			// this.getDataJson();
		},
		//获取提示信息getDetailPlanSaveMsg
		async getDetailPlanSaveMsgApi(OpeType) {
			let dataJson = {
				OpeType,
				PlanNo: Number(this.handList.planNo),	//是	string	详情中的 的PlanNo
				DmgCode: Number(this.handList.dmgCode),	//是	string	机器编号
			}
			let res = await getDetailPlanSaveMsg(dataJson);
			return res;
		},
		//修改前验证1
		async updOperationDetialsVerifyOApi() {
			let res = await updOperationDetialsVerifyO(this.getDataJson());
			return res;
		},
		//修改前验证2
		async updOperationDetialsVerifyTApi() {
			let res = await updOperationDetialsVerifyT(this.getDataJson());
			return res;
		},
		//修改
		async updOperationDetialsApi(isSaveBtn) {
			showLoading();
			let res = await updOperationDetials(this.getDataJson());
			hideLoading();
			if (res.data.code != 0 || !res) {
				this.$message({
					type: 'error',
					message: res.data.msg
				})
				//  导航条误 
				eventBus.$emit('isNavChangeErrorFn');
				//  搜索框索引误
				eventBus.$emit('backParamsForLeftView');
				return
			}

			try {
				var tempFn = null;
				tempFn = this.$store.state.isCurrentFn.toString();
			} catch (error) {
				//
			}



			// 更新成功后的操作
			this.$message.success(
				res.data.msg
			);
			//	重新加载svg
			this.$emit('updateSvgAndMarkups');

			/**
			 * new
			 */
			//	刷新？
			this.$store.state.isCurrentNext = true;
			if (this.Type == 1) this.Type = 2;
			eventBus.$emit('LoadDetailTabelData');
			eventBus.$emit("LoadMSDetailTabelData")
			this.GetOperationDetialsListApi();
			//	追加？
			if (tempFn.indexOf('ssqcop') != -1) {
				setTimeout(() => {
					this.Type = 1;
					this.handList = {
						bPosName: "ﾎﾞﾄﾑﾌﾟﾚｰﾄ",
						clCodName: " ",
						cyc: "1",
						dmgCode: 36848,
						f1CodName: " ",
						f2CodName: " ",
						f3CodName: " ",
						f4CodName: " ",
						f5CodName: " ",
						height: "11",
						iCodName: "475℃脆化",
						id: 2,
						ispSpcCode: "475℃脆化",
						ispWayName: "1212",
						lstOpeDate: "",
						macName: "zjq327配管555",
						no: "2",
						oCodName: "要",
						opeReas: "1111111111111111111111111111",
						planNo: 2,
						sCodName: "足場不要",
						specialNote: "11111111",
						status: "運用",
						stdDate: "2023-04",
						stdJudge: true,
						stdJudgeStr: "Checked",
						stdMode: "0",
						tCodName: "定期",
						useCase: "1",
						wCodName: "補修",
						yCodName: "B",
						sizCode: this.selectDataList.sizList[0].key,
						schCode: this.selectDataList.schList[0].key,
					}
					Object.keys(this.handList).forEach(key => {
						if (key != 'dmgCode' || key != 'planNo' || key != 'stdMode' || key != 'stdJudge' || key != 'useCase' || key != 'macName') {
							if (typeof (this.handList[key]) == 'number') {
								this.handList[key] = 0;
							} else if (typeof (this.handList[key]) == 'string') {
								this.handList[key] = '';
							} else {
								this.handList[key] = false;
							}
						}
					})

					this.handList.dmgCode = this.$store.state.macCode;
					this.handList.planNo = this.handList.no;
					this.handList.stdMode = '0';
					this.handList.stdJudge = true;
					this.handList.useCase = '1';
					this.handList.macName = this.selectDataList.macNumbList[0].label;
					this.handList.stdDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}`;
				}, 2000);
			}
			//	跳转？
			else if (!isSaveBtn) {
				this.$store.state.isCurrentFn()
				this.$store.commit("reSetIsCurrent");
			}
			return

			if (isSaveBtn) {
				if (this.Type == 1) this.Type = 2;
				eventBus.$emit('LoadDetailTabelData');
				eventBus.$emit("LoadMSDetailTabelData")
				this.GetOperationDetialsListApi();
				return
			}
			if (tempFn.indexOf('ssqcop') != -1) {
				// eventBus.$emit('LoadDetailTabelData');
				// eventBus.$emit("LoadMSDetailTabelData", true)
			}

			setTimeout(() => {
				//	123123
				//	追加状态
				if (tempFn.indexOf('ssqcop') != -1) {
					this.Type = 1;
					this.handList = {
						bPosName: "ﾎﾞﾄﾑﾌﾟﾚｰﾄ",
						clCodName: " ",
						cyc: "1",
						dmgCode: 36848,
						f1CodName: " ",
						f2CodName: " ",
						f3CodName: " ",
						f4CodName: " ",
						f5CodName: " ",
						height: "11",
						iCodName: "475℃脆化",
						id: 2,
						ispSpcCode: "475℃脆化",
						ispWayName: "1212",
						lstOpeDate: "",
						macName: "zjq327配管555",
						no: "2",
						oCodName: "要",
						opeReas: "1111111111111111111111111111",
						planNo: 2,
						sCodName: "足場不要",
						specialNote: "11111111",
						status: "運用",
						stdDate: "2023-04",
						stdJudge: true,
						stdJudgeStr: "Checked",
						stdMode: "0",
						tCodName: "定期",
						useCase: "1",
						wCodName: "補修",
						yCodName: "B",
						sizCode: this.selectDataList.sizList[0].key,
						schCode: this.selectDataList.schList[0].key,
					}
					Object.keys(this.handList).forEach(key => {
						if (key != 'dmgCode' || key != 'planNo' || key != 'stdMode' || key != 'stdJudge' || key != 'useCase' || key != 'macName') {
							if (typeof (this.handList[key]) == 'number') {
								this.handList[key] = 0;
							} else if (typeof (this.handList[key]) == 'string') {
								this.handList[key] = '';
							} else {
								this.handList[key] = false;
							}
						}
					})

					this.handList.dmgCode = this.$store.state.macCode;
					this.handList.planNo = this.handList.no;
					this.handList.stdMode = '0';
					this.handList.stdJudge = true;
					this.handList.useCase = '1';
					this.handList.macName = this.selectDataList.macNumbList[0].label;
					this.handList.stdDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}`;
					return
				}

				this.$store.state.isCurrentFn()
				this.$store.commit("reSetIsCurrent");
				eventBus.$emit('LoadDetailTabelData');
				eventBus.$emit("LoadMSDetailTabelData")
			}, 2000);

			return res;
		},
		//获取dataJson
		getDataJson() {
			let dataJson = {
				Account: getLocalStorage('userName'),
				Type: this.Type,	//是	int	1=追加 2=更新
				PltCode: Number(this.$store.state.pltCode),	//是	int	装置Code
				Lang: Number(getLang()),	//是	int	日本:1 英語: 0
				No: `${this.handList.no || ''}`,	//是	string	检査位置No. 4
				OldNo: `${this.handListOldData.no || ''}`,	//是	string	列表接口返回的No值 3
				BPosName: `${this.handList.bPosName || ''}`,	//是	string	検査位置 5
				OldBPosName: `${this.handListOldData.bPosName || ''}`,	//是	string	列表接口返回 检査位置
				IspWayName: `${this.handList.ispWayName || ''}`,	//是	string	検査法案 6
				OldIspWayName: `${this.handListOldData.ispWayName || ''}`,	//是	string	列表接口返回 検査法案
				ICodName: `${this.handList.iCodName || ''}`,	//是	string	検査目的 7
				OldICodName: `${this.handListOldData.iCodName || ''}`,	//是	string	列表接口返回 検査目的
				IspSpcCode: `${this.handList.ispSpcCode || ''}`,	//是	string	検査面 8
				OldIspSpcCode: `${this.handListOldData.ispSpcCode || ''}`,	//是	string	列表接口返回 検査面
				Cyc: `${this.handList.cyc || 0}`,	//是	string	点検周期 9
				OldCyc: `${this.handListOldData.cyc || ''}`,	//是	string	列表接口返回 点検周期
				StdMode: `${this.handList.stdMode || ''}`,	//是	string	規準年月(選択) 1=最終検査基準 0=基準年月 10
				OldStdMode: `${this.handListOldData.stdMode || ''}`,	//是	string	列表接口返回 規準年月(選択) 1=最終検査基準 0=基準年月
				StdDate: `${this.handList.stdDate || '2023-04'}`,	//是	string	規準年月(入力) 12
				OldStdDate: `${this.handListOldData.stdDate || ''}`,	//是	string	列表接口返回 規準年月(入力)
				StdJudge: this.handList.stdJudge,	//是	bool	規準年月も計画年月に含める 13
				OldStdJudge: this.handListOldData.stdJudge,	//是	bool	列表接口返回 規準年月も計画年月に含める
				OCodName: `${this.handList.oCodName || ''}`,	//是	string	開放要否 14
				OldOCodName: `${this.handListOldData.oCodName || ''}`,	//是	string	列表接口返回 開放要否
				UseCase: `${this.handList.useCase || ''}`,	//是	string	運用状況 選択: 1, 未選択: 0 15
				OldUseCase: `${this.handListOldData.useCase || ''}`,	//是	string	列表接口返回 運用状況 選択: 1, 未選択: 0 15
				OpeReas: `${this.handList.opeReas || ''}`,	//是	string	実施理由 17
				OldOpeReas: `${this.handListOldData.opeReas || ''}`,	//是	string	列表接口返回 実施理由
				TCodName: `${this.handList.tCodName || ''}`,	//是	string	実施時期 18
				OldTCodName: `${this.handListOldData.tCodName || ''}`,	//是	string	列表接口返回 実施時期
				WCodName: `${this.handList.wCodName || ''}`,	//是	string	作業区分 19
				OldWCodName: `${this.handListOldData.wCodName || ''}`,	//是	string	列表接口返回 作業区分
				MacName: `${this.handList.macName || ''}`,	//是	string	ラインNo 配管的LineNo 20
				OldMacName: `${this.handListOldData.macName || ''}`,	//是	string	列表接口返回 ラインNo 配管的LineNo
				CLCodName: `${this.handList.clCodName || ''}`,	//是	string	腐食系統 21cLCodName
				OldCLCodName: `${this.handListOldData.clCodName || ''}`,	//是	string	列表接口返回 腐食系統
				Height: `${this.handList.height || ''}`,	//是	string	高さ 24
				SpecialNote: `${this.handList.specialNote || ''}`,	//是	string	特記事項 35
				YCodName: `${this.handList.yCodName || ''}`,	//是	string	保温保冷 22
				SCodName: `${this.handList.sCodName || ''}`,	//是	string	足場工事 23
				F1CodName: `${this.handList.f1CodName || ''}`,	//是	string	关联因子 1 25
				F2CodName: `${this.handList.f2CodName || ''}`,	//是	string	关联因子 2 26
				F3CodName: `${this.handList.f3CodName || ''}`,	//是	string	关联因子 3 27
				F4CodName: `${this.handList.f4CodName || ''}`,	//是	string	关联因子 4 28
				F5CodName: `${this.handList.f5CodName || ''}`,	//是	string	关联因子 5 29
				MacNumb: `${this.$store.state.macNameb || ''}`,	//是	string	机器番号 39
				PlanNo: Number(this.handList.planNo),	//是	string	详情中的 的PlanNo
				DmgCode: Number(this.handList.dmgCode),	//是	string	机器编号

				ChgDate: this.handList.chgDate,
				OrgThck: this.handList.orgThck,
				MgtThck: this.handList.mgtThck,
				LmtThck: this.handList.lmtThck,
				MtrClsCode: this.handList.mtrClsCode,
				MtrName: this.handList.mtrName,
				sizCode: `${this.handList.sizCode}`,
				schCode: `${this.handList.schCode}`,

			};
			console.log(dataJson);
			return dataJson
		},
		//获取下拉框
		async GetOperationDetialsComboxApi() {
			let dataJson = {
				dmgCode: this.$store.state.macCode,
				macCode: this.$store.state.realMacCode,
				pltCode: this.$store.state.pltCode,
			}
			let res = await GetOperationDetialsCombox(dataJson);
			if (res.data.code == -310) {
				this.GSData = [];

				return
			}
			if (res.data.code != 0) {
				this.GSData = []

				return
			}
			this.selectDataList = res.data.data
			console.log(res)
		},
		//获取数据列表
		async GetOperationDetialsListApi() {
			this.Type = 2;

			this.loadingFlg = true;
			let dataJson = {
				dmgCode: this.$store.state.macCode,
			}
			let res = await GetOperationDetialsList(dataJson);
			if (res.data.code == -310) {
				this.handList = _.cloneDeep({});
				this.handListOldData = _.cloneDeep({});
				this.startData = _.cloneDeep({});
				this.noDataFlg = true;
				this.GSData = [];


				this.loadingFlg = false;
				// this.handList = {};
				// this.changeTypeFn();
				return
			}


			if (res.data.code != 0) {
				this.handList = _.cloneDeep({});
				this.handListOldData = _.cloneDeep({});
				this.startData = _.cloneDeep({});
				this.noDataFlg = true;
				this.GSData = []
				this.$message({
					type: 'error',
					message: res.data.msg
				})
				this.loadingFlg = false;
				return
			}
			this.noDataFlg = false;
			this.GSData = res.data.data;
			var id = 1;
			this.GSData.forEach((i, v) => {
				i.id = v + 1
			});
			setTimeout(() => {
				this.handList = _.cloneDeep(this.GSData[0]);
				this.handListOldData = _.cloneDeep(this.GSData[0]);
				this.startData = _.cloneDeep(this.GSData[0]);
				this.$refs.multipleTable.setCurrentRow(this.GSData[0]);
				this.loadingFlg = false;
			}, 100);
			console.log(res)
		},
		onCloseClick() {
			this.$emit("onCloseClick", false);
		},
		handleSelectionChange(e) {

			//初始监听状态
			eventBus.$emit('getBasicStyleCompontensCurrent_EventBus');	//	基本仕样
			let Fn = () => {

				this.Type = 2;
				// this.currentRow = e;
				this.handList = _.cloneDeep(e);
				this.handListOldData = _.cloneDeep(e);
				this.startData = _.cloneDeep(e);
				this.$refs.multipleTable.setCurrentRow(this.handList);
			}
			/**
			 * 2。  记录当前函数。
			 */
			if (this.$store.state.isCurrentNext) {
				Fn();
			} else {
				/**
				  * 4-1。   记录原来该运行的函数。
				  * 4-2。   执行保存弹出框操作。   
				  */
				this.$refs.multipleTable.setCurrentRow(this.handList);
				this.$store.commit("changeIsCurrentFn", Fn);

				eventBus.$emit('EventBusBasicStyleCompontensSaveFn');	//	基本仕样
			}
		},
		dateChange(val) {
			console.log(`dateChange(${this.dateValue})`, val);
			//     this.getResOfferEjectDataApi();
		},
	},
	created() {
	},
	mounted() {
		this.GetOperationDetialsComboxApi();

		eventBus.$on("isGetInfo", (row) => {
			this.activeRowIndex = 0;
			this.GetOperationDetialsListApi({ dmgCode: Number(this.$store.state.macCode) });
			this.GetOperationDetialsComboxApi();
		})
		// this.GetOperationDetialsComboxApi();
		// this.GetOperationDetialsListApi();

		if (BASE.IP == "http://192.168.33.200:8085") {
			this.timeFormat = "yyyy-MM";
		} else if (BASE.IP == "https://eng-dev-api.a-mis.com") {
			this.timeFormat = "MM-yyyy";
		} else if (BASE.IP == "https://demoapi.richtechcn.com") {
			this.timeFormat = "yyyy-MM";
		}


		//  监听通知，是否有数据变更
		eventBus.$on('getBasicStyleCompontensCurrent_EventBus', () => {
			//	非此弹框，则不监听
			if (!this.rightViewFlag1) {
				return
			}
			console.log('getBasicStyleCompontensCurrent_EventBus 111', '目视详细');

			// 获取当前数据是否更改。
			this.$store.commit("changeIsCurrentNext", !this.DataChange);
		});

		//  接受通知唤起保存弹框
		eventBus.$on('EventBusBasicStyleCompontensSaveFn', () => {
			if (!this.rightViewFlag1) {
				return
			}
			if (!this.$store.state.isCurrentFn) {
				return
			}
			console.log('EventBusBasicStyleCompontensSaveFn 222', this.$store.state.isCurrentFn);

			this.saveFn();
		});
	},
	beforeDestroy() {
		eventBus.$off("isGetInfo")

		eventBus.$off('getBasicStyleCompontensCurrent_EventBus');
		eventBus.$off('EventBusBasicStyleCompontensSaveFn');

	},
	destroyed() { },
};
</script>
<style lang="scss" scoped>
.right-cps-view {
	width: 100%;
	height: calc(100% - 2px);
	padding: 16px 0;
	border: 1px solid #c3c3c3;
}

.tbs-view {
	width: 100%;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 16px;

	.el-button+.el-button {
		margin-left: 0px;
		width: 50%;
		border-radius: 0 !important;
	}

	button {
		width: 50% !important;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		// border: 1px solid #d3d3d3;
		// border-right: 0 none;
		border-radius: 0 !important;
	}

	button:last-child {
		// border-right: 1px solid #d3d3d3;
	}

	.active-btn-style {
		// background: #106ebe;
		// color: #fff;
	}

	// .other-btn {
	// 	background-color: #FFF;
	// 	border-radius: 0 !important;

	// }
}

.list {
	margin-bottom: 12px;

	::v-deep .elx-cell--title {
		margin: 0 auto;
	}

	.mark_whole {
		width: 15px;
		height: 15px;
		border-radius: 50%;
		background-color: red;
		margin: 0 auto;
	}

	.mark_half {
		width: 15px;
		height: 15px;
		border-radius: 50%;
		border: 2px solid black;
		margin: 0 auto;
	}

	.mark_shut {
		width: 15px;
		height: 3px;
		// border-radius: 50%;
		background-color: black;
		margin: 0 auto;
	}

	::v-deep .elx-cell--title .elx-checkbox--icon::before {
		display: none;
	}
}

.row {
	width: 100%;
	display: flex;
	justify-content: flex-start;
	padding: 10px 0;
	align-items: center;

	.item {
		width: 48%;
		display: flex;
		justify-content: flex-start;
		align-items: center;

		.label {
			width: 89px;
			min-width: 89px;
			height: 32px;
			display: flex;
			align-items: center;
		}

	}

	.long-ipt {
		width: calc(100% - 85px);

		::v-deep .el-input__inner {
			width: 100%;
			height: 32px;
		}
	}

	.tip-ipt {
		width: calc(100% - 200px);

		::v-deep .el-input__inner {
			width: 100%;
			height: 32px;
		}
	}

	.w150 {
		max-width: 150px;
		min-width: 150px;
		width: 150px;
	}

	button {
		// width: 68px;
		// height: 32px;
		// line-height: 32px;
		// background: #ffffff;
		// border: 1px solid #d9d9d9;
		// border-radius: 4px;
	}

	.fb {
		display: flex;
		justify-content: space-between !important;
	}


}

.row {
	display: flex;
	justify-content: space-between;
	padding-bottom: 12px;

	.item {
		width: 48%;
		display: flex;
		justify-content: flex-start;

		.label {
			min-width: 85px;
			max-width: 85px;
			display: flex;
			align-items: center;
		}

		.strat-view {
			width: calc(100% - 89px);
			display: flex;
			align-items: center;
			justify-content: space-between;
		}
	}

	.long-item {
		width: 100%;

		.long-ipt {
			width: calc(100% - 89px);

			::v-deep .el-input__inner {
				width: 100%;
				height: 32px;
			}
		}
	}
}

.alits {
	align-items: flex-start !important;
}

.ipt {
	width: 238px;
	height: 32px;

	::v-deep .el-input__inner {
		// width: 238px;
		height: 32px;
	}

	::v-deep .el-input__inner:focus {
		border: 1px solid #dcdfe6;
	}

	::v-deep .el-input__icon {
		line-height: 32px;
		color: #909399;
	}

	::v-deep .el-input__suffix {
		width: 32px;
		right: 0;
		background: #dee0e3;
	}
}

.picker {
	width: 150px;
	height: 32px;

	::v-deep .el-input__inner {
		// width: 238px;
		height: 32px;
	}

	::v-deep .el-input__inner:focus {
		border: 1px solid #dcdfe6;
	}

	::v-deep .el-input__icon {
		line-height: 32px;
		color: #909399;
		transform: translateX(115px);
	}

	// ::v-deep .el-input__suffix {
	// 	width: 32px;
	// 	right: 0;
	// 	background: #dee0e3;
	// }
}

.orange {
	::v-deep .el-input__inner {
		background: #ffdeac;
	}
}



.container {
	width: 100%;
	height: calc(100% - 32px);
	overflow-y: scroll;
	padding: 12px 8px 28px 16px;

	.add-view {
		width: 100%;
		padding-bottom: 12px;
		border-bottom: 1px solid #d9d9d9;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		margin-bottom: 12px;

		button {
			width: 68px;
			height: 32px;
			// background: #ffffff;
			// border: 1px solid #d9d9d9;
			margin-left: 12px;
			border-radius: 4px;
		}
	}
}

.radio-view {
	width: 238px;
	height: 32px;
	border-radius: 4px;
	border: 1px solid #d9d9d9;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 3px;

	::v-deep .el-radio {
		width: 35%;
	}
}

.textarea {
	::v-deep .el-textarea__inner {
		resize: none;
		// background: #ffffe1;
	}
}

.footer-view {
	position: absolute;
	z-index: 10;
	bottom: 5px;
	width: calc(100% - 2px);
	height: 47px;
	padding: 0 15px;
	border-top: 1px solid #d9d9d9;
	display: flex;
	align-items: center;
	background: #ffffff;
	justify-content: space-between;

	button {
		min-width: 82px;
		height: 32px;
		// background: #ffffff;
		// border: 1px solid #d9d9d9;
		margin-right: 12px;
		border-radius: 4px;
	}

	button:nth-child(1) {
		// background: #106ebe;
		// color: #fff;
		padding: 0 15px;
		// border-radius: 0;
	}

	button:nth-child(2) {
		// position: absolute;
		// background: #eb7421;
		// color: #fff;
		right: 0px;
		line-height: 0;
	}
}

.center {
	text-align: center !important;
}

.w48 {
	width: 48px !important;
	min-width: 48px !important;

	::v-deep .el-input__inner {
		width: 100%;
		height: 32px;
		margin: 0 auto;
		padding: 0;
		text-align: center;
	}
}

.b700 {
	font-weight: 700;
}

.spb {
	justify-content: space-between !important;
}

.ii ::v-deep .el-input__suffix {
	display: none;
}

::v-deep .el-icon-date {
	// background-color: red;
	float: right;
	transform: translateX(120px);
}

::v-deep .el-date-editor .el-input__inner {
	padding-left: 15px !important;
}

// ::v-deep .row--current {
// 	background-color: rgb(233, 236, 237) !important;
// }

.mar10 {
	margin-right: 10px;
}

.small-ipt {
	width: 180px;

	::v-deep .el-input__inner {
		width: 100%;
		height: 32px;
	}
}

.ipt1 {
	width: 155px;
	height: 32px;
	margin: 0 8px;

	::v-deep .el-input__inner {
		width: 155px;
		height: 32px;
	}

	::v-deep .el-input__inner:focus {
		border: 1px solid #dcdfe6;
	}

	::v-deep .el-input__icon {
		line-height: 32px;
		color: #909399;
	}
}

.mini-ipt74 {
	width: 94px;
	min-width: 94px;

	::v-deep .el-input__inner {
		width: 100%;
		height: 32px;
		text-align: right;
	}
}

.center {
	::v-deep .el-input__inner {
		text-align: center !important;
	}
}
</style>